@import "~scss/variables";

.sw-cms-el-product-slider {
    .sw-cms-el-product-slider__title {
        margin: 20px 0;
    }

    .sw-cms-el-product-slider__content {
        position: relative;

        .sw-cms-el-product-slider__navigation {
            align-self: center;
            justify-self: center;
        }

        .sw-cms-el-product-slider__product-holder {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
            gap: 0 32px;
        }
    }

    &.has--navigation-outside {
        .sw-cms-el-product-slider__title {
            padding: 0 25px;
        }

        .sw-cms-el-product-slider__content {
            display: grid;
            grid-template-columns: 25px 1fr 25px;
        }
    }

    &.has--navigation-inside {
        .sw-cms-el-product-slider__navigation {
            position: absolute;
            height: 65px;
            left: 0;
            top: 50%;
            translate: 0 -50%;
            z-index: $z-index-overlay;
            opacity: 0.5;
            background-color: $color-gray-200;
            display: flex;
            align-items: center;

            &.is--right-arrow {
                left: unset;
                right: 0;
            }

            &:hover {
                opacity: 1;
            }
        }
    }

    &.has--border {
        padding: 25px;
        border: 1px solid $color-gray-300;
        border-radius: $border-radius-default;

        &.has--navigation-outside {
            padding: 25px 0;
        }

        .sw-cms-el-product-slider__title {
            margin-top: 0;
        }
    }
}
